package com.czkt.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.czkt.entity.vo.BasDictAndService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SvrRptMapper {
    @Select("select b.dict_value,b.dict_item,count(c.svr_type)as svr_type from bas_dict b left JOIN cst_service c on c.svr_type = b.dict_value where b.dict_type = '服务类型' GROUP BY b.dict_item,b.dict_value ORDER BY b.dict_value")
    IPage<BasDictAndService> selectBasDictByService(IPage<BasDictAndService> page);


    @Select("select b.dict_value,b.dict_item,count(c.svr_type)as svr_type from bas_dict b left JOIN cst_service c on c.svr_type = b.dict_value where b.dict_type = '服务类型' GROUP BY b.dict_item,b.dict_value ORDER BY b.dict_value")
    List<BasDictAndService> selectBasDictBySvr();
}
